-
Notifications
You must be signed in to change notification settings - Fork 0
Clone kafka 18894 #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Your subscription expired on 10/2/2025. To continue using Refacto code reviews, please renew or upgrade your subscription. |
WalkthroughThe change replaces direct ConfigProvider usage with Plugin-wrapped providers across clients and Connect. Constructors, fields, and wiring now accept Map<String, Plugin>. Metrics integration is added for monitorable providers. Tests are updated accordingly. Minor Vagrantfile formatting and Javadoc updates included. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor App
participant AC as AbstractConfig
participant CT as ConfigTransformer
participant PMap as Map<String, Plugin<ConfigProvider>>
participant P as Plugin<ConfigProvider>
participant CP as ConfigProvider
App->>AC: resolveConfigVariables(...)
AC->>AC: instantiateConfigProviders -> PMap
AC->>CT: new ConfigTransformer(PMap)
AC->>CT: transform(configs)
CT->>PMap: find providerPlugin by name
alt provider found
CT->>P: get()
P-->>CT: CP
CT->>CP: get(path, keys)
CP-->>CT: ConfigData
CT-->>AC: transformed configs
else provider missing
CT-->>AC: error for missing provider
end
AC->>PMap: close plugins
sequenceDiagram
autonumber
actor Admin
participant W as Worker
participant Pl as Plugins
participant Met as Metrics
participant P as Plugin<ConfigProvider>
participant WCT as WorkerConfigTransformer
participant CT as ConfigTransformer
Admin->>W: initConfigTransformer()
loop for each providerName
W->>Pl: newConfigProvider(config, providerName, usage, Met)
Pl->>Pl: load & configure ConfigProvider
Pl->>P: Plugin.wrapInstance(provider, Met, providersPrefix, {provider: name})
Pl-->>W: P
end
W->>WCT: new WorkerConfigTransformer(W, Map<name,P>)
WCT->>CT: new ConfigTransformer(Map<name,P>)
Admin-->>W: ready
sequenceDiagram
autonumber
participant Mon as MonitorableConfigProvider
participant PM as PluginMetrics
note over Mon,PM: Metrics registration path
Mon->>Mon: configure(configs)
Mon->>PM: withPluginMetrics(metrics)
PM-->>Mon: register metric {name, description, tags}
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✨ Finishing touches
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.39.5)connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerTest.javaThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @DDShantanuBadmanji, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances Kafka Connect's configuration provider mechanism by introducing the capability for Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces metrics for ConfigProvider implementations by wrapping them in a new Plugin class and leveraging the Monitorable interface. The changes are well-implemented across the codebase, including updates to AbstractConfig, ConfigTransformer, and various components in the Connect runtime. I've found one issue in AbstractConfig where the provider name is not being passed as a metric tag, which could lead to metric collisions. My detailed feedback is in the comment below.
| ConfigProvider provider = Utils.newInstance(entry.getValue(), ConfigProvider.class); | ||
| provider.configure(configProperties); | ||
| configProviderInstances.put(entry.getKey(), provider); | ||
| Plugin<ConfigProvider> providerPlugin = Plugin.wrapInstance(provider, null, CONFIG_PROVIDERS_CONFIG); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When wrapping the ConfigProvider instance, the provider name should be included as a tag to ensure unique metrics when multiple providers of the same class are used. Without this, metrics from different provider instances of the same class could collide.1
| Plugin<ConfigProvider> providerPlugin = Plugin.wrapInstance(provider, null, CONFIG_PROVIDERS_CONFIG); | |
| Plugin<ConfigProvider> providerPlugin = Plugin.wrapInstance(provider, null, CONFIG_PROVIDERS_CONFIG, Map.of("provider", entry.getKey())); |
Style Guide References
Footnotes
-
The Javadoc for
ConfigProvider, updated in this same pull request, states that the 'provider' tag is automatically added to all registered metrics. This change ensures that the provider name is correctly passed to be used as a tag, aligning with the documented behavior and preventing metric collisions. ↩
|
/refacto-bot |
|
Refacto is reviewing this PR. Please wait for the review comments to be posted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
Vagrantfile(1 hunks)clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java(4 hunks)clients/src/main/java/org/apache/kafka/common/config/ConfigTransformer.java(3 hunks)clients/src/main/java/org/apache/kafka/common/config/provider/ConfigProvider.java(1 hunks)clients/src/test/java/org/apache/kafka/common/config/ConfigTransformerTest.java(5 hunks)clients/src/test/java/org/apache/kafka/common/config/provider/MonitorableConfigProvider.java(1 hunks)connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorMakerConfig.java(2 hunks)connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java(1 hunks)connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerConfigTransformer.java(3 hunks)connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/Plugins.java(3 hunks)connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerConfigTransformerTest.java(5 hunks)connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerTest.java(5 hunks)connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/PluginsTest.java(4 hunks)
🧰 Additional context used
🧬 Code graph analysis (10)
clients/src/test/java/org/apache/kafka/common/config/ConfigTransformerTest.java (1)
clients/src/main/java/org/apache/kafka/common/internals/Plugin.java (1)
Plugin(33-92)
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerTest.java (4)
core/src/test/scala/integration/kafka/server/DynamicBrokerReconfigurationTest.scala (1)
MockFileConfigProvider(1636-1641)clients/src/test/java/org/apache/kafka/common/config/provider/MonitorableConfigProvider.java (1)
MonitorableConfigProvider(29-58)clients/src/main/java/org/apache/kafka/common/internals/Plugin.java (1)
Plugin(33-92)clients/src/main/java/org/apache/kafka/common/metrics/Metrics.java (1)
Metrics(70-696)
clients/src/test/java/org/apache/kafka/common/config/provider/MonitorableConfigProvider.java (1)
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala (1)
withPluginMetrics(6299-6301)
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerConfigTransformer.java (2)
clients/src/main/java/org/apache/kafka/common/internals/Plugin.java (1)
Plugin(33-92)clients/src/main/java/org/apache/kafka/common/utils/Utils.java (1)
Utils(93-1700)
clients/src/main/java/org/apache/kafka/common/config/ConfigTransformer.java (1)
clients/src/main/java/org/apache/kafka/common/internals/Plugin.java (1)
Plugin(33-92)
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorMakerConfig.java (2)
clients/src/main/java/org/apache/kafka/common/internals/Plugin.java (1)
Plugin(33-92)connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/Plugins.java (1)
Plugins(59-696)
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerConfigTransformerTest.java (1)
clients/src/main/java/org/apache/kafka/common/internals/Plugin.java (1)
Plugin(33-92)
clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java (2)
clients/src/main/java/org/apache/kafka/common/internals/Plugin.java (1)
Plugin(33-92)clients/src/main/java/org/apache/kafka/common/utils/Utils.java (1)
Utils(93-1700)
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/PluginsTest.java (3)
clients/src/test/java/org/apache/kafka/common/config/provider/MonitorableConfigProvider.java (1)
MonitorableConfigProvider(29-58)clients/src/main/java/org/apache/kafka/common/internals/Plugin.java (1)
Plugin(33-92)clients/src/main/java/org/apache/kafka/common/metrics/Metrics.java (1)
Metrics(70-696)
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/Plugins.java (2)
clients/src/main/java/org/apache/kafka/common/internals/Plugin.java (1)
Plugin(33-92)connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerConfig.java (1)
WorkerConfig(58-463)
🔇 Additional comments (3)
clients/src/test/java/org/apache/kafka/common/config/ConfigTransformerTest.java (3)
20-20: LGTM! Plugin wrapping aligns with the migration.The addition of the Plugin import and wrapping of TestConfigProvider correctly aligns with the broader migration from direct ConfigProvider usage to Plugin. Passing
nullfor metrics is appropriate for test scenarios, as the Plugin class handles this gracefully by skipping metrics registration.Also applies to: 49-49
54-54: LGTM! Modern map construction improves readability.Replacing
Collections.singletonMapwithMap.ofis a cleaner, more concise approach for creating immutable single-entry maps with non-null values. This modernizes the test code without changing semantics.Also applies to: 63-63, 72-72, 79-79, 86-86, 93-93, 102-102
109-109: LGTM! Correctly retains Collections.singletonMap for null value.This test case must use
Collections.singletonMapinstead ofMap.ofbecauseMap.ofdoes not permit null values. The retention is correct and necessary for testing null config values.
| public ConfigData get(String path) { | ||
| return null; | ||
| } | ||
|
|
||
| @Override | ||
| public ConfigData get(String path, Set<String> keys) { | ||
| return null; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return empty ConfigData instead of null
ConfigTransformer calls ConfigProvider#get(...).data() and will throw an NPE when these helpers hand back null. Please return an empty ConfigData instead so the tests stay robust.
Apply this diff:
@Override
public ConfigData get(String path) {
- return null;
+ return new ConfigData(Map.of());
}
@Override
public ConfigData get(String path, Set<String> keys) {
- return null;
+ return new ConfigData(Map.of());
}Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In
clients/src/test/java/org/apache/kafka/common/config/provider/MonitorableConfigProvider.java
around lines 41 to 48, the two get(...) methods currently return null which
causes callers to NPE; change both methods to return an empty ConfigData
instance (i.e., a ConfigData whose data map is empty) instead of null so callers
can safely call .data() without checks.
| for (String name : providerNames) { | ||
| ConfigProvider configProvider = plugins.newConfigProvider( | ||
| Plugin<ConfigProvider> configProviderPlugin = plugins.newConfigProvider( | ||
| this, | ||
| CONFIG_PROVIDERS_CONFIG + "." + name, | ||
| Plugins.ClassLoaderUsage.PLUGINS | ||
| name, | ||
| Plugins.ClassLoaderUsage.PLUGINS, | ||
| null | ||
| ); | ||
| providers.put(name, configProvider); | ||
| providerPlugins.put(name, configProviderPlugin); | ||
| } | ||
| ConfigTransformer transformer = new ConfigTransformer(providers); | ||
| ConfigTransformer transformer = new ConfigTransformer(providerPlugins); | ||
| Map<String, String> transformed = transformer.transform(props).data(); | ||
| providers.values().forEach(x -> Utils.closeQuietly(x, "config provider")); | ||
| providerPlugins.values().forEach(x -> Utils.closeQuietly(x, "config provider plugin")); | ||
| return transformed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skip null config provider plugins
Plugins.newConfigProvider(...) returns null when config.providers.<name>.class is absent. With the new loop we still insert that null, so ConfigTransformer trips over a NullPointerException when it dereferences the plugin. Please keep the old guard and only put non-null plugins into the map.
Apply this diff:
for (String name : providerNames) {
Plugin<ConfigProvider> configProviderPlugin = plugins.newConfigProvider(
this,
name,
Plugins.ClassLoaderUsage.PLUGINS,
null
);
- providerPlugins.put(name, configProviderPlugin);
+ if (configProviderPlugin != null) {
+ providerPlugins.put(name, configProviderPlugin);
+ }
}🤖 Prompt for AI Agents
In
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorMakerConfig.java
around lines 274 to 286, the loop currently inserts null entries into
providerPlugins because Plugins.newConfigProvider(...) can return null; update
the loop to only call providerPlugins.put(name, configProviderPlugin) when
configProviderPlugin is non-null (i.e., guard with an if (configProviderPlugin
!= null) check) so ConfigTransformer does not receive null values, and ensure
that later cleanup/close logic only iterates over and closes the non-null plugin
instances.
| private WorkerConfigTransformer initConfigTransformer() { | ||
| final List<String> providerNames = config.getList(WorkerConfig.CONFIG_PROVIDERS_CONFIG); | ||
| Map<String, ConfigProvider> providerMap = new HashMap<>(); | ||
| Map<String, Plugin<ConfigProvider>> providerPluginMap = new HashMap<>(); | ||
| for (String providerName : providerNames) { | ||
| ConfigProvider configProvider = plugins.newConfigProvider( | ||
| config, | ||
| WorkerConfig.CONFIG_PROVIDERS_CONFIG + "." + providerName, | ||
| ClassLoaderUsage.PLUGINS | ||
| Plugin<ConfigProvider> configProviderPlugin = plugins.newConfigProvider( | ||
| config, | ||
| providerName, | ||
| ClassLoaderUsage.PLUGINS, | ||
| metrics.metrics() | ||
| ); | ||
| providerMap.put(providerName, configProvider); | ||
| providerPluginMap.put(providerName, configProviderPlugin); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guard against null config provider plugins
Plugins.newConfigProvider(...) returns null when a provider name has no .class configured. We add that null to the map, and later WorkerConfigTransformer dereferences it, producing an NPE during worker startup. Please keep the null check and only register plugins that actually loaded.
Apply this diff:
for (String providerName : providerNames) {
Plugin<ConfigProvider> configProviderPlugin = plugins.newConfigProvider(
config,
providerName,
ClassLoaderUsage.PLUGINS,
metrics.metrics()
);
- providerPluginMap.put(providerName, configProviderPlugin);
+ if (configProviderPlugin != null) {
+ providerPluginMap.put(providerName, configProviderPlugin);
+ }
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| private WorkerConfigTransformer initConfigTransformer() { | |
| final List<String> providerNames = config.getList(WorkerConfig.CONFIG_PROVIDERS_CONFIG); | |
| Map<String, ConfigProvider> providerMap = new HashMap<>(); | |
| Map<String, Plugin<ConfigProvider>> providerPluginMap = new HashMap<>(); | |
| for (String providerName : providerNames) { | |
| ConfigProvider configProvider = plugins.newConfigProvider( | |
| config, | |
| WorkerConfig.CONFIG_PROVIDERS_CONFIG + "." + providerName, | |
| ClassLoaderUsage.PLUGINS | |
| Plugin<ConfigProvider> configProviderPlugin = plugins.newConfigProvider( | |
| config, | |
| providerName, | |
| ClassLoaderUsage.PLUGINS, | |
| metrics.metrics() | |
| ); | |
| providerMap.put(providerName, configProvider); | |
| providerPluginMap.put(providerName, configProviderPlugin); | |
| } | |
| for (String providerName : providerNames) { | |
| Plugin<ConfigProvider> configProviderPlugin = plugins.newConfigProvider( | |
| config, | |
| providerName, | |
| ClassLoaderUsage.PLUGINS, | |
| metrics.metrics() | |
| ); | |
| if (configProviderPlugin != null) { | |
| providerPluginMap.put(providerName, configProviderPlugin); | |
| } | |
| } |
🤖 Prompt for AI Agents
In connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java
around lines 210 to 221, the loop unconditionally adds the result of
plugins.newConfigProvider(...) to providerPluginMap even though
newConfigProvider can return null when a provider has no .class configured; this
leads to an NPE later. Fix by checking the returned configProviderPlugin for
null and only put it into providerPluginMap if non-null (optionally log or warn
when a provider name yields null) so WorkerConfigTransformer will only receive
valid plugins.
Code Review: ConfigProvider Plugin Metrics Integration👍 Well Done
📌 Files Processed
📝 Additional Comments
|
| } | ||
| } | ||
| providers.values().forEach(x -> Utils.closeQuietly(x, "config provider")); | ||
| providerPlugins.values().forEach(x -> Utils.closeQuietly(x, "config provider plugin")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resource Leak Risk
The closeQuietly method is called on the Plugin wrapper rather than the ConfigProvider instance. This changes the resource management logic, as the Plugin.close() method may not properly delegate to the wrapped ConfigProvider's close() method, potentially causing resource leaks.
Standards
- Logic-Verification-Resource-Management
- Business-Rule-Lifecycle-Management
- Algorithm-Correctness-Delegation-Pattern
| public Plugin<ConfigProvider> newConfigProvider(AbstractConfig config, String providerName, ClassLoaderUsage classLoaderUsage, Metrics metrics) { | ||
| String providerPrefix = WorkerConfig.CONFIG_PROVIDERS_CONFIG + "." + providerName; | ||
| String classPropertyName = providerPrefix + ".class"; | ||
| Map<String, String> originalConfig = config.originalsStrings(); | ||
| if (!originalConfig.containsKey(classPropertyName)) { | ||
| // This configuration does not define the config provider via the specified property name | ||
| return null; | ||
| } | ||
|
|
||
| ConfigProvider plugin = newVersionedPlugin(config, classPropertyName, null, ConfigProvider.class, classLoaderUsage, scanResult.configProviders()); | ||
|
|
||
| // Configure the ConfigProvider | ||
| String configPrefix = providerPrefix + ".param."; | ||
| Map<String, Object> configProviderConfig = config.originalsWithPrefix(configPrefix); | ||
| try (LoaderSwap loaderSwap = safeLoaderSwapper().apply(plugin.getClass().getClassLoader())) { | ||
| plugin.configure(configProviderConfig); | ||
| } | ||
| return plugin; | ||
| return Plugin.wrapInstance(plugin, metrics, WorkerConfig.CONFIG_PROVIDERS_CONFIG, Map.of("provider", providerName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent Method Naming
Method signature changed from newConfigProvider to return Plugin but still uses 'plugin' variable name for the unwrapped instance. This creates confusion between the wrapped and unwrapped objects, making maintenance harder. Variable names should reflect their actual types.
Standards
- Clean-Code-Naming
- Maintainability-Quality-Consistency
- Clean-Code-Variable-Naming
| plugin.configure(configProviderConfig); | ||
| } | ||
| return plugin; | ||
| return Plugin.wrapInstance(plugin, metrics, WorkerConfig.CONFIG_PROVIDERS_CONFIG, Map.of("provider", providerName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing Variable Assignment
The configProviderConfig variable is used but never defined in the method. This will cause a compilation error and indicates incomplete refactoring. The code needs to extract configuration properties from the provided config parameter.
Map<String, Object> configProviderConfig = config.originalsWithPrefix(providerPrefix + ".");
try (LoaderSwap loaderSwap = safeLoaderSwapper().apply(plugin.getClass().getClassLoader())) {
plugin.configure(configProviderConfig);
}
Commitable Suggestion
| plugin.configure(configProviderConfig); | |
| } | |
| return plugin; | |
| return Plugin.wrapInstance(plugin, metrics, WorkerConfig.CONFIG_PROVIDERS_CONFIG, Map.of("provider", providerName)); | |
| Map<String, Object> configProviderConfig = config.originalsWithPrefix(providerPrefix + "."); | |
| try (LoaderSwap loaderSwap = safeLoaderSwapper().apply(plugin.getClass().getClassLoader())) { | |
| plugin.configure(configProviderConfig); | |
| } |
Standards
- Clean-Code-Variable-Usage
- Maintainability-Quality-Completeness
| configTransformer = new WorkerConfigTransformer(worker, Map.of("test", Plugin.wrapInstance(new TestConfigProvider(), null, "config.providers"))); | ||
| } | ||
|
|
||
| @Test | ||
| public void testReplaceVariable() { | ||
| // Execution | ||
| Map<String, String> result = configTransformer.transform(MY_CONNECTOR, Collections.singletonMap(MY_KEY, "${test:testPath:testKey}")); | ||
| Map<String, String> result = configTransformer.transform(MY_CONNECTOR, Map.of(MY_KEY, "${test:testPath:testKey}")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent Map Creation
The code inconsistently uses Map.of() in line 69 but still uses Collections.singletonMap() in line 75. This creates maintenance confusion with mixed styles. Standardize on the more modern Map.of() approach throughout the codebase for consistency.
Standards
- Clean-Code-Consistency
- Maintainability-Quality-Modernization
| import org.apache.kafka.common.config.provider.MockFileConfigProvider; | ||
| import org.apache.kafka.common.config.provider.MonitorableConfigProvider; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused Import
The ConfigProvider import is added but not directly used in the modified code. Unused imports increase maintenance burden by creating false dependencies. Remove unnecessary imports to improve code clarity and maintainability.
Standards
- Clean-Code-Imports
- Maintainability-Quality-Clarity
| } | ||
| } | ||
| providers.values().forEach(x -> Utils.closeQuietly(x, "config provider")); | ||
| providerPlugins.values().forEach(x -> Utils.closeQuietly(x, "config provider plugin")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resource Cleanup Risk
The closeQuietly method is now called on Plugin objects rather than ConfigProvider instances directly. This could lead to improper resource cleanup if the Plugin wrapper doesn't properly delegate close operations to the wrapped provider.
Standards
- ISO-IEC-25010-Reliability-Recoverability
- ISO-IEC-25010-Functional-Correctness-Appropriateness
- DbC-Resource-Mgmt
Delete this text and replace it with a detailed description of your change. The
PR title and body will become the squashed commit message.
If you would like to tag individuals, add some commentary, upload images, or
include other supplemental information that should not be part of the eventual
commit message, please use a separate comment.
If applicable, please include a summary of the testing strategy (including
rationale) for the proposed change. Unit and/or integration tests are expected
for any behavior change and system tests should be considered for larger
changes.
Summary by CodeRabbit